-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Replace all @chakra/*
dependencies with @chakra-ui/react
+ remove unnecessary react imports
#323
Conversation
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"downlevelIteration": true, | ||
"skipLibCheck": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was necessary to add this in order to prevent Chakra UI from causing the tsc
to fail. Not an ideal solution.
@@ -39,28 +39,16 @@ | |||
"start": "nodemon --watch src --exec npm run build -e ts,tsx" | |||
}, | |||
"dependencies": { | |||
"react-select": "5.8.0" | |||
"react-select": "5.8.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized I don't need to be so strict as to not allow other patch versions of react-select
, so this just opens it up for the others.
📊 Package size report -3.09%↓
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
There has been a lot of back and forth on whether this package should use
@chakra-ui/react
as it's peer dependency, or just the individual sub-packages it relies on. Originally, it just used the root package as it's peer dependency, but after a suggestion, that was swapped out with the individual packages: #56However, since then there have been a lot of complaints (mostly by people who use yarn as their package manager) about not having all of the included peer dependencies in their
package.json
:peerDeps
which are already enforced via Chakra UI itself #47@chakra-ui/system
to peer dependencies #136Ultimately, I've realized that for most people, having
@chakra-ui/react
as the actual peer dependency works best for the majority of users, including myself, as most people are using the package in it's entirety as a dependency, instead of the sub-packages.However, all of the imports are still being pulled in from the sub-packages. I'm not sure if this is the ideal approach, but it's possible this will still allow those who only have the sub-packages installed to use this component if they ignore the peer dependency.